<?php
class Lib_Application_Resource_Utils extends Zend_Application_Resource_ResourceAbstract {
    
    public function init() {
        $this->_initRoutes();
    }

    protected function _initRoutes(){
        $options = $this->getOptions();
        $routesConfig = new Zend_Config_Ini($options['routes']['path'], APPLICATION_ENV);
        $frontController = Zend_Controller_Front::getInstance();
        $router = $frontController->getRouter();

        // Add main routes section

        if(count($routesConfig)){
            $router->addConfig($routesConfig,'routes');
        }
    }
}